package com.ctgu.chatapp.view.adapter

import androidx.recyclerview.widget.DiffUtil
import com.ctgu.chatapp.showPojo.FriendQuest

class DiffCallBackForRequest(
    private val oldList: List<FriendQuest>,
    private val newList: List<FriendQuest>
) :
    DiffUtil.Callback() {
    override fun getOldListSize() = oldList.size

    override fun getNewListSize() = newList.size

    override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int) =
        oldList[oldItemPosition].touId == newList[newItemPosition].touId

    override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int) =
        oldList[oldItemPosition].state == newList[newItemPosition].state
}